<template>
    <bc-message ref="CustomMessage">
        <!-- data -->
        <template v-slot:imageImport="{}">
            <imgUpload style="height: 100px" :argObj="argObj" @input="upload" />
        </template>
    </bc-message>
</template>
<script>
import Component, { mixins } from 'vue-class-component';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Prop, Watch } from 'vue-property-decorator';
@Component({
    name: 'images-import-popup',
    components: {
        bcMessage: () => import('../../../../../../components/message/index.vue'),
        imgUpload: () => import('../../../../../../components/img-upload/index.vue')
    }
})
export default class App extends mixins() {
    // 额外参数
    argObj = {
        type: 3
    };
    // 图片路径
    fileList = [];
    // 上传反馈事件
    upload(fileList) {
        this.fileList = fileList;
    }
    // 启动
    $view(parameter, Function, destroy) {
        setTimeout(async () => {
            await this.$refs['CustomMessage'].$ViewMessage({
                data: {},
                title: '图片管理',
                slotName: 'imageImport',
                showClose: true,
                width: '390px',
                callback: async (status) => {
                    if (status && (await Function(this.fileList))) {
                        destroy();
                        return true;
                    }
                    destroy();
                    return true;
                }
            });
        }, 100);
    }
}
</script>
